interface State {
  showSidenav: boolean
}

const state: State = {
  showSidenav: false
};

const getters = {
  getShowSidebar: (state: State) => {
    return state.showSidenav;
  }
}

const actions = {
  toggleSidenav({ commit }) {
    commit('toggle')
  }
}

const mutations = {
  toggle(state, payload) {
    state.showSidenav = !state.showSidenav;
  }
}

export default {
  namespaced: true,
  state,
  getters,
  actions,
  mutations
}